<template>
  <div class="showTable">
    <div class="table">
      <div class="table-tr thead">
        <div class="table-th">客户话术</div>
        <div class="table-th color1">参考话术</div>
        <div class="table-th color1">学员表达</div>
        <div class="table-th">得分</div>
        <div class="table-th">拟合度</div>
      </div>
      <div class="table-tr tbody" v-for="item in showdata">
        <div class="table-th" :class="{ weight: !item.name2 }">
          <p>{{ item.name }}</p>
        </div>
        <div class="table-th">
          <p>{{ item.name2 }}</p>
        </div>
        <div class="table-th">
          <p>{{ item.name3 }}</p>
        </div>
        <div class="table-th" :class="{ weight: !item.name2 }">
          <p>{{ item.score }}</p>
        </div>
        <div class="table-th" :class="{ weight: !item.name2 }">
          <p>{{ item.similar }}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'showTable',
  props: ['showdata'],
  data() {
    return {};
  },
  created() {},
  methods: {},
  mounted() {},
};
</script>

<style scoped>
.table,
.table * {
  margin: 0 auto;
  padding: 0;
  font-size: 14px;
}
.table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  color: #303030;
  font-size: 16px;
}
.thead {
  background: #eaeff5;
}
.thead .table-th {
  background-color: #4472c4;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border-radius: 10px;
  min-width: 100px;
  height: 44px;
}
/* .thead .table-th:first-of-type {
  min-width: 160px !important;
} */
.color1 {
  background-color: #5b9bd5 !important;
}

.table-tr {
  display: table-row;
}
.table-th {
  display: table-cell;
  height: 100%;
  /* border: 1px solid #dcdcdd; */
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
  border-right: 8px solid #fff;
  border-left: 8px solid #fff;
  padding: 5px 10px;
}
.table-td {
  display: table-cell;
  height: 100%;
  /* border: 1px solid gray; */
  text-align: center;
  vertical-align: middle;
}
.tbody .table-th {
  color: #303030;
  font-size: 16px;
}

.tbody p {
  line-height: 28px;
  font-style: normal;
  font-weight: normal;
  /* border-bottom: 1px solid #dcdcdd; */
}
.tbody p:nth-child(2n) {
  background-color: #f4f4f4;
}
.tbody p:last-of-type {
  border-bottom: none;
}
.tbody .table-th {
  background-color: #ecf1f9;
}
.tbody .table-th:nth-of-type(2) {
  background-color: #eef5fb;
}
.tbody .table-th:nth-of-type(3) {
  background-color: #eef5fb;
}
.weight p {
  font-size: 20px !important;
  font-weight: bold !important;
}
</style>
